home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / fsinstall / sprite.h < prev   
C/C++ Source or Header  |  1989-11-08  |  2KB  |  85 lines

  1. /*
  2.  * sprite.h --
  3.  *
  4.  * Common constants and type declarations for Sprite.
  5.  *
  6.  * Copyright 1985, 1988 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: sprite.h,v 1.3 88/07/15 16:42:41 ouster Exp $ SPRITE (Berkeley)
  16.  */
  17.  
  18. #ifndef _SPRITE
  19. #define _SPRITE
  20.  
  21. /*
  22.  * A boolean type is defined as an integer, not an enum. This allows a
  23.  * boolean argument to be an expression that isn't strictly 0 or 1 valued.
  24.  */
  25.  
  26. typedef int Boolean;
  27. #ifndef TRUE
  28. #define TRUE    1
  29. #endif TRUE
  30. #ifndef FALSE
  31. #define FALSE    0
  32. #endif FALSE
  33.  
  34. /*
  35.  * Functions that must return a status can return a ReturnStatus to
  36.  * indicate success or type of failure.
  37.  */
  38.  
  39. typedef int  ReturnStatus;
  40.  
  41. /*
  42.  * The following statuses overlap with the first 2 generic statuses 
  43.  * defined in status.h:
  44.  *
  45.  * SUCCESS            There was no error.
  46.  * FAILURE            There was a general error.
  47.  */
  48.  
  49. #define    SUCCESS            0x00000000
  50. #define    FAILURE            0x00000001
  51.  
  52.  
  53. /*
  54.  * A nil pointer must be something that will cause an exception if 
  55.  * referenced.  There are two nils: the kernels nil and the nil used
  56.  * by user processes.
  57.  */
  58.  
  59. #define NIL         0xFFFFFFFF
  60. #define USER_NIL     0
  61.  
  62. /*
  63.  * An address is just a pointer in C.  It is defined as a character pointer
  64.  * so that address arithmetic will work properly, a byte at a time.
  65.  */
  66.  
  67. typedef char *Address;
  68.  
  69. /*
  70.  * ClientData is an uninterpreted word.  It is defined as an int so that
  71.  * kdbx will not interpret client data as a string.  Unlike an "Address",
  72.  * client data will generally not be used in arithmetic.
  73.  */
  74.  
  75. #ifndef _CLIENTDATA
  76. typedef int *ClientData;
  77. #define _CLIENTDATA
  78. #endif
  79.  
  80. #ifndef __STDC__
  81. #define volatile
  82. #endif
  83.  
  84. #endif _SPRITE
  85.